package com.design.pattern.strategy.config;

import com.design.pattern.strategy.handler.Pay;
import com.design.pattern.strategy.processor.DefaultPayProcessor;
import com.design.pattern.strategy.processor.PayProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * @author 王霄
 * @date 2022/3/9 22:09
 */
@Configuration
public class PayConfig {

    @Bean
    public PayProcessor payProcessor(List<Pay> payList) {
        return new DefaultPayProcessor(payList);
    }
}
